Wire up organization client endpoints into OrganizationsClientsSection#324
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 1 minor |
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes. Give us feedback
…tory endpoints Create OrganizationsClientsSection to properly group all organization-client interfaces (IOrganizationsClients, IOrganizationsClientOverview, and IOrganizationBandwidthUsageHistory) following the established section pattern. - Add OrganizationsClientsSection.cs with RefitPromoteCalls for backward compat - Update OrganizationsSection.cs Clients property to use new section type - Update MerakiClient.cs to wire up all three client interfaces Agent-Logs-Url: https://github.com/panoramicdata/Meraki.Api/sessions/20dfd578-4d0e-48ec-ab9d-98478d1a1b16 Co-authored-by: danielabbatt <8926756+danielabbatt@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Wires previously-unreachable organization client-related endpoints into the MerakiClient/OrganizationsSection hierarchy by introducing a dedicated OrganizationsClientsSection, aligning the Organizations “clients” surface with the existing Networks pattern.
Changes:
- Added
OrganizationsClientsSectionto group client search, overview, and bandwidth usage history endpoints. - Updated
OrganizationsSection.Clientsto expose the newOrganizationsClientsSection. - Updated
MerakiClientconstructor wiring to initialize the new nested client interfaces.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Meraki.Api/Sections/General/Organizations/OrganizationsSection.cs | Exposes Clients as a section (instead of a flat interface) to match other section hierarchies. |
| Meraki.Api/Sections/General/Organizations/OrganizationsClientsSection.cs | New section grouping the three organization client interfaces, promoting calls for the legacy search interface. |
| Meraki.Api/MerakiClient.cs | Wires up the new section’s interfaces (Clients, Overview, BandwidthUsageHistory) via Refit. |
| /// <summary> | ||
| /// Interface for client search and details. | ||
| /// Section for client search and details. | ||
| /// </summary> | ||
| public IOrganizationsClients Clients { get; internal set; } = null!; | ||
| public OrganizationsClientsSection Clients { get; internal set; } = new(); |
There was a problem hiding this comment.
Changing OrganizationsSection.Clients from IOrganizationsClients to OrganizationsClientsSection is a public API signature change. [RefitPromoteCalls] preserves method-call syntax, but consumers that reference the property as IOrganizationsClients (e.g., assignments/DI registrations/method params) will no longer compile. If the intent is truly non-breaking, consider keeping a public IOrganizationsClients-typed property (possibly obsolete) or having OrganizationsClientsSection implement IOrganizationsClients so it remains assignable to the interface; otherwise this should be treated/documented as a breaking change (SemVer/changelog).
|
|
||
| /// <summary> | ||
| /// Interface for client search and details. | ||
| /// Section for client search and details. |
There was a problem hiding this comment.
The XML doc for OrganizationsSection.Clients still describes only “client search and details”, but this section now also exposes Overview and BandwidthUsageHistory endpoints. Update the summary to reflect the full scope to avoid misleading IntelliSense for consumers.
| /// Section for client search and details. | |
| /// Section for client search, details, overview, and bandwidth usage history operations. |
| Clients = new() | ||
| { | ||
| Clients = RefitFor(Organizations.Clients.Clients), | ||
| BandwidthUsageHistory = RefitFor(Organizations.Clients.BandwidthUsageHistory), | ||
| Overview = RefitFor(Organizations.Clients.Overview), | ||
| }, |
There was a problem hiding this comment.
New public surface area is being wired (Organizations.Clients.Overview and .BandwidthUsageHistory), but there are no corresponding tests exercising these endpoints (only GetOrganizationClientsSearchAsync is covered). Consider adding integration tests alongside Meraki.Api.Test/Organizations/Clients/Tests.cs to ensure these newly exposed interfaces remain correctly wired and callable.
IOrganizationsClientOverviewandIOrganizationBandwidthUsageHistoryinterfaces existed but were never wired intoMerakiClientorOrganizationsSection. TheIOrganizationsClients(search) was wired as a flat interface rather than a proper section.Changes
OrganizationsClientsSection— Groups all three client interfaces following theNetworksClientsSectionpattern. Uses[RefitPromoteCalls]on the internalIOrganizationsClientsfor backward compatibility.OrganizationsSection.Clients— Changed fromIOrganizationsClientstoOrganizationsClientsSectionMerakiClientwiring — Wires upClients,BandwidthUsageHistory, andOverviewExisting consumer code is unaffected: